package com.mao.extends4feature;

public class Test2 {
    public static void main(String[] args) {
        // 继承后子类的访问特点，就近原则
        zi z = new zi();
        z.printName();
    }
}

class Fu {
    String name = "fu的name";
}

class zi extends Fu {
    String name = "zi的name";

    public void printName() {
        String name = "show的name";
        System.out.println(name);
        //System.out.println(this.name);//zi的name
        //System.out.println(super.name);//fu的name
    }
}